module.exports = {
  schedule: {
    cron: '0 30 17 * * ?',
    type: 'worker',
    env: ['pachong'],
    // immediate: true
  },

  async task(ctx) {
    const topics = await ctx.service.cacheSvc.get('ddpush');
    let result = 0;
    if (topics && topics.length > 0) {
      result = await ctx.helper.dd_push(topics);
      ctx.logger.info(`钉钉推送每日一读 ready ${topics.length} success ${JSON.stringify(result)}`);
    }
  }

};